package twentyThreePattern.StructuralPattern7.proxy.DynamicProxy.section1;

public class Client {
	public static void main(String[] args) {
		IGamePlayer gamePlayer = new GamePlayer("zhangsan");
		IGamePlayer proxy = DynamicProxy.newInstance(gamePlayer.getClass().getClassLoader(),
				gamePlayer.getClass().getInterfaces(), new MyInvocationHandler(gamePlayer));
		// 登陆
		proxy.login("zhangSan", "password");
		// 开始杀怪
		proxy.killBoss();
		// 升级
		proxy.upgrade();

		// 记录结束游戏时间
		System.out.println("结束时间是：2009-8-26 03:40");

	}

}
